<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<div id="heading" class="section">
	<h2>Registrarse en el sistema</h2>
</div>

<div class="section">

    <form:form modelAttribute="persona"  method="post" action="registrar">
	 <div class="field">
                <div class="label">
                        <label for="searchString">Nombre:</label>
                </div>
                <div class="input">
                   <form:input path="nombre"/>
                     <script type="text/javascript">
                    Spring.addDecoration(new Spring.ElementDecoration({
                        elementId : "nombre",
                        widgetType : "dijit.form.ValidationTextBox",
                        widgetAttrs : { required : true, promptMessage:"Nombre",invalidMessage : "Ingrese su nombre." }
                         }));
                </script>
                </div>
          </div>
          <div class="field">
                <div class="label">
                        <label for="searchString">Apellidos:</label>
                </div>
                <div class="input">
                   <form:input path="apellido"/>
                     <script type="text/javascript">
                   Spring.addDecoration(new Spring.ElementDecoration({
                        elementId : "apellido",
                        widgetType : "dijit.form.ValidationTextBox",
                        widgetAttrs : { required : true, promptMessage:"Apellidos",invalidMessage : "Ingrese su apellidos." }
                         }));
		</script>
                </div>
          </div>

           <div class="field">
                <div class="label">
                        <label for="searchString">Email:</label>
                </div>
                <div class="input">
                   <form:input path="email"/>
                     <script type="text/javascript">
                    Spring.addDecoration(new Spring.ElementDecoration({
                        elementId : "email",
                        widgetType : "dijit.form.ValidationTextBox",
                        widgetAttrs : { required : true, promptMessage:"Email",
                            invalidMessage : "Ingrese un email valido."
                          }}));
		</script>
                </div>
          </div>
          <div class="field">
                <div class="label">
                        <label for="searchString">Usuario:</label>
                </div>
                <div class="input">
                   <form:input path="usuario"/>
                     <script type="text/javascript">
                    Spring.addDecoration(new Spring.ElementDecoration({
                        elementId : "apellido",
                        widgetType : "dijit.form.ValidationTextBox",
                        widgetAttrs : { required : true, promptMessage:"Nombre de usuario",
                            invalidMessage : "Ingrese su correo electronico." }
                         }));
		</script>
                </div>
          </div>
            <div class="field">
                <div class="label">
                        <label for="searchString">Clave:</label>
                </div>
                <div class="input">
                   <form:password path="password"/>
                     <script type="text/javascript">
                   Spring.addDecoration(new Spring.ElementDecoration({
                        elementId : "apellido",
                        widgetType : "dijit.form.ValidationTextBox",
                        widgetAttrs : { required : true, promptMessage:"Password del sistema",
                            invalidMessage : "Ingrese una clave para usar dentro del sistema." }
                         }));
		</script>
                </div>
          </div>

        &nbsp;<br/>
        &nbsp;<br/>
        &nbsp;<br/>
        &nbsp;<br/>
        &nbsp;<br/>
        &nbsp;<br/>
	<div class="buttonGroup">
            <input type="submit" name="submitform" value="Registrar"/>
	</div>
        </form:form>

</div>